package com.example.demo2_review.design_pattern.behavioral_patterns.strategy_pattern;

/**
 * @Author zwp14
 * @create 2024/6/25 1:19
 * @description 创建 Context 类来使用 Strategy
 */
public record Context(Strategy strategy) {

    public int executeStrategy(int num1, int num2) {
        return strategy.doOperation(num1, num2);
    }
}
